<template>
  <div>
    <h1>App组件</h1>
    <button @click="add">让Content组件内部的count累加</button>
    <Content ref="content"></Content>
  </div>
</template>

<script>
import Content from "@/components/Content";
export default {
  name: "App",
  components: {
    Content,
  },
  data() {
    return {};
  },
  methods: {
    add() {
      this.$refs.content.count++;
    },
  },
  mounted() {
    console.log(this);
    console.log(this.$root.a, "App");
  },
};
</script>

<style>
</style>
